import java.util.Arrays;
public class StringToIntegerArray {
public static void main(String args[]) {
String [] str = {"123", "345", "437", "894"};
int size = str.length;
int [] arr = new int [size];
for(int i=0; i<size; i++) {
arr[i] = Integer.parseInt(str[i]);
}
System.out.println(Arrays.toString(arr));
}
}
String s = "1234";
int[] intArray = new int[s.length()];
for (int i = 0; i < s.length(); i++) {
intArray[i] = Character.digit(s.charAt(i), 10);
}
int[] arr = Stream.of(new String[]{"1", "2", "3"})
.mapToInt(Integer::parseInt).toArray();
System.out.println(Arrays.toString(arr));
int i, k = 0;
for (i = 0; i < n; i++)
k = 10 * k + a[i];